package Test.Exam;

import java.util.Scanner;

/**
 * @ClassName problem_8
 * @since: 2024/3/23 17:51
 * @auth: kirito
 * @description:
 * 水仙花数
 **/
public class problem_8 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int m = sc.nextInt();
        int n = sc.nextInt();
        f(m,n);
    }

    private static void f(int m, int n) {
        boolean flag = true;
        for (int i = m; i <= n; i++) {
            int a = i / 100;
            int b = i / 10 % 10;
            int c = i % 10;
            if (a * a * a + b * b * b + c * c * c == i) {
                flag = false;
                System.out.println(i);
            }
        }
        if (flag) {
            System.out.println("no");
        }
    }
}
